package demo1;

interface Shape {
    public abstract void draw();
}
class Rect implements Shape {
    public void draw() {
        System.out.println("矩形");
    }
}
class Flower implements Shape {
    public void draw() {
        System.out.println("❀");
    }
}
public class Test {
    public static void drawMap(Shape shape) {
        shape.draw();
    }
    public static void main(String[] args) {
        drawMap(new Flower());
        drawMap(new Rect());
    }
}






